<include file="Base:common_head" />
<div id="bd">
    <div class="left1">
        <include file="User:leftmenu" />
    </div>
    <div class="right1">
        <div class="userinfos">
            <div class="topinfo">
                <div class="innerbox">
                    <div class="photo"><img src="/Public/images/photo{$Think.session.type}.jpg" width="48" height="48"><span><if condition="$Think.session.type eq 1">设计师 <else/>掌&nbsp;&nbsp;柜</if></span></div>
                    <div class="info">
                        <p style="font-size:14px; font-weight:bold;"><span class="name">{$Think.session.name}</span>，欢迎您来到模板返利网</p>
                        <p>已经绑定手机号码：{$Think.session.phone|substr=0,3}*****{$Think.session.phone|substr=8,3}&nbsp;&nbsp;<a href="__URL__/changephone">更换绑定手机</a></p>
                        <p style="color:#666; border-bottom:1px solid #ddd;  height:35px; display:block; width:380px;">
                        <empty name="Think.session.qq">您还没有填写QQ，为了方便联系，现在去补充吧，<a href="__URL__/update">补全资料</a><else/>常用QQ：{$Think.session.qq}&nbsp;&nbsp;</empty>                        </p>
                        <p style="margin-top:5px;">账户余额：<b style="color:#d50000; padding:0 5px; font-size:18px;">{$money}</b>元</p>
                        <p style="height:35px; margin-top:7px;" class="bottom">
                        <if condition="$Think.session.type eq 1"><a href="__URL__/chongzhi" id="chong"><span>充&nbsp;&nbsp;值</span></a></if>
                        <a href="__URL__/tixian" id="tixian"><span>提&nbsp;&nbsp;现</span></a>
                        <a href="__URL__/orderlist/status/1">未付款订单</a>
                        <a href="__URL__/orderlist"><if condition="$Think.session.type eq 1">订单记录<else/>购买的模板</if></a>
                        </p> 
                    </div>
                </div>
            </div>
            <div class="topnote">
                <div class="innerbox">
                    <dl>
                        <dt>公告</dt>
                        <foreach name="nlist" item="li" key="k">
                            <dd><a href="#">{$k+1}.{$li.title}</a></dd>
                        </foreach>
                    </dl>
                </div>
            </div>
            <div class="ad1">
                <if condition="$Think.session.type eq 1">
                    <embed height="150" width="750" flashvars="bannerWidth=750&bannerHeight=150&bannerSID=http://img3.tbcdn.cn/tfscom/T1G9RQXpheXXXgzXjX.xml&bannerXML=&bannerLink=http://&dataSource=&bid=35388315&appSource=default" wmode="transparent" allowscriptaccess="always" quality="high" name="35388315" id="35388315" style="" src="http://img.uu1001.cn/bcv3.swf?v=20121219" type="application/x-shockwave-flash"/></embed>         
                    <else/>
                    <embed height="120" width="750" flashvars="bannerWidth=750&bannerHeight=120&bannerSID=http://img2.tbcdn.cn/tfscom/T1aOXQXvReXXXgzXjX.xml&bannerXML=&bannerLink=http://&dataSource=&bid=35384473&appSource=default" wmode="transparent" allowscriptaccess="always" quality="high" name="35384473" id="35384473" style="" src="http://img.uu1001.cn/bcv3.swf?v=20121219" type="application/x-shockwave-flash"/></embed>            </if>
            </div>

            <div class="list J_TWidget" data-widget-type="Tabs" data-widget-config="{'triggerType':'click'}">
                <ul class="ks-switchable-nav">
                    <if condition="$_SESSION['type'] eq 1">
                    <li class="ks-active">我的模板</li>
                    </if>                    
                    <li <if condition="$_SESSION['type'] neq 1">class="ks-active"</if>>进行中的订单</li>
                    <li>已完成的订单</li>                    
                </ul>
                <div class="contents" style="width:99999px;">
                    <div class="ks-switchable-content">
                    	<if condition="$_SESSION['type'] eq 1">
                        <div class="templist"><include file="User:templist" /></div>
                        </if> 
                        <div  class="templist" <if condition="$_SESSION['type'] eq 1">style="display:none;"</if>><include file="Base:mybill" /></div>
                        <div  class="templist" style="display:none;"><include file="User:myorder" /></div>                                              
                    </div>
                </div>               
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript">
    //购买添加旺旺信息
    function ws(ind){
        $.get('__URL__/allmes/ind/'+ind,function(data){
            $("#tips").show();
            $("body").css({"overflow-Y":"hidden"});
            var h = window.screen.height;
            var w = window.screen.width;
            $("#tips").css({"left":(w/2-100)+"px","top":(h/2-100)+"px","display":"block"});
            $("#tips").html(data);
        });
       
 
    }
    //确认
    function wsy(i,ind){
        var wwname = $("#wwname").val();
        if(i ==1){
            $.get('__URL__/allmesy/ind/'+ind+'/wwname/'+wwname,function(){
                $("#qu"+ind).html("等待设计师确认");
                $("#q"+ind).html("确认");
                $("#tips").hide();
                $("body").css({"overflow":"auto"});
                var h = window.screen.height;
                var w = window.screen.width;
                $("#edit").css({"left":(w/2)+"px","top":(h/2-100)+"px","display":"block"});
                $("#edit").html('修改成功').animate({opacity: 'hide'}, 1000);
            });
        }else{
            $("#tips").hide();
            $("body").css({"overflow":"auto"});
        }
    }
    //设计师确认
    function qu(ind,wwname,id,dom){
        var zgname = $(dom).parent().parent().siblings("#zgname").html(); //掌柜名
        var price = $(dom).parent().parent().siblings(".price").html() * $(dom).parent().parent().siblings(".rate").children("#rate").html() *0.01; //返利费用
        var r=confirm("该用户提交的旺旺名为："+wwname+" ,返现金额为"+price+"请核对无误后确认。现在是否确认完成订单？(订单完成后将返现到该用户)")
        if (r==true){
            $.get('__URL__/que/ind/'+ind+'/price/'+price+'/zgname/'+zgname+'/id/'+id,function(data){
                if(data){
                    var h = window.screen.height;
                    var w = window.screen.width;
                    $("#edit").css({"left":(w/2)+"px","top":(h/2-100)+"px","display":"block"});
                    $("#edit").html(data);
                    var t=setTimeout("settime()",1000)
                }else{
                    $("#query"+ind).html("完成");
                    $("#query1"+ind).html("确认");
                    var h = window.screen.height;
                    var w = window.screen.width;
                    $("#edit").css({"left":(w/2)+"px","top":(h/2-100)+"px","display":"block"});
                    $("#edit").html('确认成功').animate({opacity: 'hide'}, 1000);
					document.location.reload();
                }
            });
        }
    }
    function settime(){
        $("#edit").animate({opacity: 'hide'}, 5000);
    }
    function sel(dom){
        var v = $(dom +'option:selected') .val();
        if(v == "qu"){
            $("#wangwang").show();
        }
    }
    //参数传递
    function pag(i){
        $.get('__URL__/orderlist/i/'+i,function(){
                
        });
    }
    function dell(i,n){
        var r=confirm("确认删除?")
        if (r==true){
            if(n==1){
                $("#q"+i).animate({opacity: 'hide'}, 500);
            }else{
                $("#w"+i).animate({opacity: 'hide'}, 500);
            }
            $.get('__URL__/dellorder/id/'+i,function(data){
                if(data == 1){
                    var h = window.screen.height;
                    var w = window.screen.width;
                    $("#edit").css({"left":(w/2)+"px","top":(h/2-100)+"px","display":"block"});
                    $("#edit").html('删除成功').animate({opacity: 'hide'}, 1000);
                }
                    
            });
        }
    }
</script>
</html>
